00a6255c88079d215c9fb235e19b2bd376f3dd0c,src/main/java/com/elasticbox/jenkins/model/repository/api/BoxRepositoryAPIImpl.java,BoxRepositoryAPIImpl,getNoCloudFormationPolicyBoxes,#String#,83
Before Change
@Override
public List<PolicyBox> getNoCloudFormationPolicyBoxes(String workspace) throws RepositoryException {
try{
JSONArray boxesFromAPI = client.getAllBoxes(workspace);
List<PolicyBox> policyBoxes = new NoCloudFormationPolicyBoxesJSONCriteria().filter(boxesFromAPI);
return policyBoxes;
} catch (IOException e) {
logger.log(Level.SEVERE, "There is an error retrieving boxes for this workspace: " + workspace + " from the API", e);
throw new RepositoryException("Error retrieving no cloudformation policies boxes from API, workspace: "+workspace);
After Change
public List<PolicyBox> getNoCloudFormationPolicyBoxes(String workspace) throws RepositoryException {
try{
return transform(
filter(client.getAllBoxes(workspace),
new CompositeBoxFilter()
.add(new BoxFilter())
.add(new NoCloudFormationPolicyBoxesFilter())),
new PolicyBoxTransformer());
} catch (IOException e) {
logger.log(Level.SEVERE, "There is an error retrieving boxes for this workspace: " + workspace + " from the API", e);